#include "system/resource.h"

namespace dw {
	namespace system {

IResource::IResource(const std::string& name)
:	_name(name)
,	_loaded(false)
{
}

IResource::~IResource()
{
}

void IResource::loadFromFile(const std::string& filename)
{
	std::ifstream fs(filename.c_str(), std::ios::binary);

	_name = filename;
	size_t lastSlash = _name.find_last_of("\\");
	if (lastSlash != std::string::npos)
		_name = _name.substr(lastSlash + 1);
	if (fs)
		load(fs);
	fs.close();
}
	
	}
}

